//
//  DKEssenceViewController.m
//  BS1
//
//  Created by 丁侃 on 16/4/23.
//  Copyright © 2016年 丁侃. All rights reserved.
//

#import "DKEssenceViewController.h"

@interface DKEssenceViewController ()

@end

@implementation DKEssenceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = DKRandomColor;

    //将设置导航栏内容抽取
    [self setupNavContent];

    
}




//将设置导航栏内容抽取
-(void)setupNavContent
{
    //添加titleView
    self.navigationItem.titleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"MainTitle"]];
    
    /*
     UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
     [btn setImage:[UIImage imageNamed:@"nav_item_game_icon"] forState:UIControlStateNormal];
     [btn setImage:[UIImage imageNamed:@"nav_item_game_click_icon"] forState:UIControlStateHighlighted];
     
     [btn sizeToFit];
     [btn addTarget:self action:@selector(gameClick) forControlEvents:UIControlEventTouchUpInside];
     */
    //添加左按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem dk_itemWithTarget:self ation:@selector(gameClick) ImageNameNormal:@"nav_item_game_icon" imageNameHighlighted:@"nav_item_game_click_icon"];
    
    /*
     UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
     [rightBtn setImage:[UIImage imageNamed:@"navigationButtonRandom"] forState:UIControlStateNormal];
     [rightBtn setImage:[UIImage imageNamed:@"navigationButtonRandomClick"] forState:UIControlStateHighlighted];
     [rightBtn sizeToFit];
     */
    
    //添加右按钮
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem dk_itemWithTarget:self ation:@selector(randomClick) ImageNameNormal:@"navigationButtonRandom" imageNameHighlighted:@"navigationButtonRandomClick"];
}

-(void)randomClick
{
    DKFunc
}

-(void)gameClick
{
   DKFunc
}


@end
